Bugs in a parallel program, such as a multi-threaded program and a multi-processed program, may be one of the most difficult to test and diagnose among all software bugs. There are some types of bugs in the parallel program, such as a data race and a data access atomicity violation. The data race may, for example, occur when two threads access, at least one of which being a write, the same data in a memory concurrently without proper synchronization. The data access atomicity violation may, for example, occur when a code region is executed in a non-atomic way in opposite to an expectation of executing it as an atomic region. Algorithm for the data access atomicity detection may depend on an observation called access interleaving invariant that is a good indication of programmers' assumptions about the atomicity of a certain code region.